#include "syscall.h"

int
main()
{
    SpaceId newProc;
    OpenFileId input = ConsoleInput;
    OpenFileId output = ConsoleOutput;
    char ch, buffer[60];
    char *prompt= "Nachos>>";
    int i;

//
//    prompt[0] = '-';
//    prompt[1] = '-';

    while( 1 )
    {
		Write(prompt, 9, output);

		i = 0;

		do {

			Read(&buffer[i], 1, input);

		} while( buffer[i++] != '\n' );
	
		buffer[--i] = '\0';
	
		if( i > 0 ) {
			newProc = Exec(buffer);
			Join(newProc);
		}
    }
}

